//- 先去这个pug文件中找
extends ../commons/commons.pug

block append pageStyle
	link(href="${relativePath}/static/css/shopping/tjOrder.css" rel="stylesheet" type="text/css")
	link(href="${relativePath}/static/css/shopping/payment.css" rel="stylesheet" type="text/css")

block content
	//- 提交订单内容
	div.placeOrderCon.layout
		//- logo部分
		div.submitHeader
			div.logo.fl
				img(src="${relativePath}/static/imgs/shopin.png")

			//- 进度条
			div.orderProcess.fr
				div.processBox.processBoxred
					span.progress1.settwo.current
						span.num 1
						br
						span.progressMsg 提交订单
					span.progress1.settwo.progress2.current
						span.num 2
						br
						span.progressMsg.current 商家接单
					span.progress1.progress3.current
						span.num 3
						br
						span.progressMsg.current 支付
					span.progress1.progress4.current
						span.num 4
						br
						span.progressMsg 完成
		//- 账户余额支付成功
		div.payaccount
			div.countTitle.donecountTitle 付款成功
			div.countBox.countDone
				p.allMoney 
				div.bottomBox 
					p.address
					div.specBox
						div.row
							label.fl 订单编号：
							span.txt.fl.bhNum 
						div.row
							label.fl 商品名称：
							span.txt.fl.goodsName 
						div.row
							label.fl 商品规格：
							ul.fl.ggList

			

block append pageScript

	script.
		$(function() {
			$.post(shopIp+"/Order/info",{
				userToken:token,
				order_id:thisRequest.order_id,
				user_identity:"buyer"
			},function(data) {
				//console.log(data);
				var datas = data.data;
				$(".allMoney").html("您已成功付款"+datas.goods.amount_price+"元。");
				$(".address").html("商品寄送至："+datas.reciver.reciver_address+"&nbsp;&nbsp;"+"收货人："+datas.reciver.reciver_name+"&nbsp;&nbsp;"+"电话："+datas.reciver.reciver_mobile);
				$(".bhNum").html(datas.goods.order_sn);
				$(".goodsName").html(datas.goods.goods_name);
				//- 规格列表
				var gg = datas.goods.sku_list;
				for(var i=0;i<gg.length;i++) {
					var liEle = "<li>"+gg[i].spec_name+"："+gg[i].opt_name+"</li>";
					$(".ggList").append(liEle);
				}
			})
		})
		


		